<html lang="en">
<head>
<title>SearchLink</title>

<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="/js/jquery.tmpl.js"></script>
<script type="text/javascript" src="/js/jquery.container.js"></script>

<script type="text/javascript" src="/ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="/ui/jquery.ui.button.js"></script>
<script type="text/javascript" src="/ui/jquery.effects.blind.js"></script>
<script type="text/javascript" src="/ui/jquery-ui-1.8.13.custom.js"></script>
<script type="text/javascript" src="/js/jquery.editinplace.js"></script>
<script type="text/javascript" src="/js/jquery.cookie.js"></script>
<script type="text/javascript" src="/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/js/jquery.jeditable.js"></script>
<script type="text/javascript" src="/js/jquery.getQueryParam.1.0.0.full_.js"></script>

<script>
document.write('<link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/themes/'+parent.theme+'/jquery-ui.css" rel="stylesheet" />');
</script>
<link type="text/css" rel="stylesheet" href="/css/style.css">
<script type="text/javascript" src="https://www.google.com/jsapi?key=ABQIAAAAiRSrYe9E3DGgVKtXRO-0ExTpBP_TfdLX-o1ZNoG4n5_KvVbODxTsNEaew3aZNZE17bSB8GRFN8lyDw"></script>
<script type="text/javascript">
linkconfigKey = $.getQueryParam("key");
linkData = parent.getLinkConfig()[linkconfigKey];
var customSearchControl = null; 
// Load the Search API
google.load('search', '1');
google.load("jquery", "1.6.4");
google.load("jqueryui", "1.8.16");
// Set a callback to load the Custom Search Element when you page loads
google.setOnLoadCallback(
function(){
	$("a.setLink, a.openLink", "").button();
	customSearchControl = new google.search.CustomSearchControl(linkData.customSearchID);
	// Use "mysite_" as a unique ID to override the default rendering.
	google.search.Csedr.addOverride("mysite_");
	// Draw the Custom Search Control in the div named "CSE"
	customSearchControl.draw('cse');
	// Execute an initial search
	searchInput = parent.getSearchText();
	customSearchControl.setResultSetSize(4)
	customSearchControl.setSearchCompleteCallback(this, searchComplete, null);
	customSearchControl.execute(searchInput);
	parent.searchPageInitialized(linkData);
	},
	true
);
function searchComplete() {
}

function executeSearch(searchInput) {
	if (searchInput != null && searchInput != "") {
		customSearchControl.execute(searchInput);
	} 
}

</script>
</head>
<body>
<div style="display:none">

<div id="mysite_action"></div>
<div id="mysite_thumbnail"></div>
<!-- Return the unescaped result URL.-->
<div id="mysite_webResult">
	<div class="gs-webResult gs-result" data-vars="{longUrl:function() { var i = unescapedUrl.indexOf(visibleUrl); return i < 1 ? visibleUrl : unescapedUrl.substring(i);}}">
	<!-- Build the result data structure.-->
		<table border="0"><tr><td valign="top">
<!-- Append results within the table cell.-->
			<div class="gs-myactions ui-state-highlight ui-corner-all">
			      <table><tr><td>
				      <table style="width:auto"><tr><td>
					    <a class="gs-title setLink" data-attr="{title:longUrl()}"
					   	onClick="parent.setHotelUrlLinkForForm(linkData.key ,this.title);return false;" 
					    data-body="html('Set As Link')">#</a>
    				</td><td>
        				    <a class="gs-title openLink" data-attr="{href:unescapedUrl,target:target}" data-body="html('Open In Browser')"></a>
    				</td></tr></table>
			    </td></tr></table>
			</div>
			<div class="gs-title"><a class="gs-title" data-attr="{href:unescapedUrl,target:target}" data-body="html(title)"></a> </div>
			<div class="gs-snippet" data-body="html(content)"></div>
			<div class="gs-visibleUrl gs-visibleUrl-short" data-body="longUrl()"></div>
			<div style="color:#676767" data-if="Vars.richSnippet && Vars.richSnippet.document">

				<!-- Insert an icon denoting the result file type.-->
				<img data-attr="{src:Vars.richSnippet.document.filetypeImage}">
				<!-- Insert the author name for this Scribd post.-->
				By <span data-body="Vars.richSnippet.document.author"></span>  - 
				<!-- Insert the number of pages in this Scribd result.-->
				<span data-body="Vars.richSnippet.document.pageCount"></span> pages - 
				<!-- Insert the number of times this Scribd post has been viewed.-->
				<span data-body="Vars.richSnippet.document.viewCount"></span> views
				<!-- Insert the last modified date-->
				- last modified  <span data-body="Vars.richSnippet.document.timeAgo"></span>
			</div>
			<!-- Render results.-->
			<div data-if="Vars.richSnippet && Vars.richSnippet.action" class="gs-actions" data-body="render('action',richSnippet,{url:unescapedUrl,target:target})"></div>
		</td></tr></table>
	</div>
</div>
</div>

<!-- Div container for the searcher.-->
<div id="cse"></div>
</body>
</html>
